const express = require('express')
const app = express()
// 设置跨域
app.use(function(req,res,next){
  res.header('Access-Control-Allow-Origin', '*');

  res.header('Access-Control-Allow-Headers', 'Content-Type,Content-Length,Authorization, Accept, X-Requested-With , yourHeaderFeild');

  res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE,OPTIONS');
  // 千万不要网%%￥￥￥###
  // 千万不要网
  // 千万不要网
  next();
})
  

const chartOne = require('./router/one.js')
const chartTwo = require('./router/two.js')
const chartThree = require('./router/three.js')
const chartFour = require('./router/four.js')
const chartMap = require('./router/map.js')


app.use('/one', chartOne)
app.use('/two', chartTwo)
app.use('/three', chartThree)
app.use('/four', chartFour)
app.use('/china', chartMap)

app.listen(8888)
